package com.xyzq.cgate.core.plugin.pre;

import com.xyzq.cgate.common.enums.PluginDetailEnum;
import com.xyzq.cgate.core.plugin.IPlugin;
import com.xyzq.cgate.core.plugin.IPluginChain;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @Description:
 * @author chenchen
 * @date 2019/6/19 13:50
 */
public class RequestPlugin implements IPlugin {

    @Override
    public Mono<Void> execute(ServerWebExchange exchange, IPluginChain chain) {
        return chain.execute(exchange);
    }

    @Override
    public String getPluginPhase() {
        return PluginDetailEnum.REQUEST.getPhase();
    }

    @Override
    public int getCode() {
        return PluginDetailEnum.REQUEST.getCode();
    }

    @Override
    public String getName() {
        return PluginDetailEnum.REQUEST.getName();
    }
}
